From ba7e4a550868bc28f47b499ce00bf908371c3678 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Wed, 17 Jul 2013 01:53:12 +0000 Subject: [PATCH] Make maggeo consistent about TZ when reading and writing dates. (This is still grubby code, but it's hardly strategic...) git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4444 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/defs.h | 5 ++--- gpsbabel/maggeo.cc | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gpsbabel/defs.h b/gpsbabel/defs.h index 17361a9f8..bae38ef4c 100644 --- a/gpsbabel/defs.h +++ b/gpsbabel/defs.h @@ -275,7 +275,6 @@ class geocache_data { is_available(status_unknown), is_memberonly(status_unknown), has_customcoords(status_unknown), - last_found(0), placer_id(0), favorite_points(0) {} @@ -288,8 +287,8 @@ class geocache_data { status_type is_available:2; status_type is_memberonly:2; status_type has_customcoords:2; - gpsbabel::DateTime exported; - time_t last_found; + gpsbabel::DateTime exported; + gpsbabel::DateTime last_found; QString placer; /* Placer name */ int placer_id; /* Placer id */ QString hint; /* all these UTF8, XML entities removed, May be not HTML. */ diff --git a/gpsbabel/maggeo.cc b/gpsbabel/maggeo.cc index fda2a439d..a3b7f43da 100644 --- a/gpsbabel/maggeo.cc +++ b/gpsbabel/maggeo.cc @@ -188,7 +188,7 @@ maggeo_fmtdate(time_t t) cbuf[0] = '\0'; if (t > 0) { - tm = gmtime(&t); + tm = localtime(&t); if (tm) { date = tm->tm_mday * 100000 + (1+tm->tm_mon) * 1000 + tm->tm_year; -- 2.30.2